﻿<%@ Control Language="VB" AutoEventWireup="false" CodeFile="AssetEliminate.ascx.vb"
    Inherits="WebForm_AssetMaintain_Component_AssetEliminate" %>
<%@ Register Src="../../MyPager.ascx" TagName="MyPager" TagPrefix="uc1" %>
        <asp:ObjectDataSource ID="dbAssetDef" runat="server" SelectMethod="GetAssetType"
            TypeName="AssetManage.BBL.AssetBBL">
            <SelectParameters>
                <asp:Parameter DefaultValue="1" Name="kind" Type="String" />
                <asp:ControlParameter ControlID="hiDBName" DefaultValue="" Name="dbName" PropertyName="Value"
                    Type="String" />
            </SelectParameters>
        </asp:ObjectDataSource>
        <asp:ObjectDataSource ID="dbASSET1" runat="server" 
    SelectMethod="GetAssetData1" TypeName="AssetManage.BBL.AssetBBL">
            <SelectParameters>
                <asp:ControlParameter ControlID="ddlassetdef_id" Name="assetdef_id" PropertyName="SelectedValue"
                    Type="String" DefaultValue="0" />
                <asp:ControlParameter ControlID="txtasset_owner" Name="asset_owner" PropertyName="Text"
                    Type="String" ConvertEmptyStringToNull="False" DefaultValue="" />
                <asp:ControlParameter ControlID="txtasset_serialNo" Name="asset_SerialNo" PropertyName="Text"
                    Type="String" ConvertEmptyStringToNull="False" DefaultValue="" />
                <asp:ControlParameter ControlID="txtDept" Name="Dept" PropertyName="Text" Type="String"
                    ConvertEmptyStringToNull="False" DefaultValue="" />
                <asp:ControlParameter ControlID="hiEmpty" Name="HouseID" PropertyName="Value" Type="String"
                    ConvertEmptyStringToNull="False" DefaultValue="" />
                <asp:ControlParameter ControlID="hiEmpty" ConvertEmptyStringToNull="False" Name="MAC"
                    PropertyName="Value" Type="String" />
                <asp:ControlParameter ControlID="hiEmpty" ConvertEmptyStringToNull="False" Name="ComputerName"
                    PropertyName="Value" Type="String" />
                <asp:ControlParameter ControlID="hiEmpty" ConvertEmptyStringToNull="False" Name="IP"
                    PropertyName="Value" Type="String" />
                <asp:ControlParameter ControlID="hiDBName" PropertyName="Value" Name="dbName" Type="String"
                    ConvertEmptyStringToNull="False"></asp:ControlParameter>
                <asp:Parameter DefaultValue="Distributed" Name="asset_status" />
            </SelectParameters>
        </asp:ObjectDataSource>
        <asp:HiddenField ID="hiDBName" runat="server" />
        <asp:HiddenField ID="hiEmpty" runat="server" />
<asp:ObjectDataSource ID="dbOAFactory" runat="server" SelectMethod="GetOAFactory"
    TypeName="AssetManage.BBL.AssetBBL">
    <SelectParameters>
        <asp:Parameter DefaultValue="0" Name="kind" Type="String" />
        <asp:ControlParameter ControlID="hiDBName" DefaultValue="" Name="dbName" PropertyName="Value"
            Type="String" />
    </SelectParameters>
</asp:ObjectDataSource>
        <asp:Panel ID="panel1" runat="server" BackColor="#E7FEC2" BorderWidth="1" Width="950px"
            Height="500px" ScrollBars="Auto">
            <table border="1">
                <tr>
                    <td colspan="6" align="center">
                        <asp:Label ID="Label1" runat="server" meta:resourcekey='lblTitle' Font-Bold="True"
                            Font-Size="20px"></asp:Label>
                    </td>
                </tr>
                <tr>
                    <td align="right" style="width: 111px">
                        <asp:Label ID="lblAssetDef" runat="server" meta:resourcekey="lblAssetDef"></asp:Label>
                    </td>
                    <td style="width: 182px">
                        <asp:DropDownList ID="ddlassetdef_id" runat="server" Width="120px" DataSourceID="dbAssetDef"
                            DataTextField="name" DataValueField="id">
                        </asp:DropDownList>
                    </td>
                    <td align="right" style="width: 144px">
                        <asp:Label ID="lblAssetowner" runat="server" meta:resourcekey="lblAssetowner"></asp:Label>
                    </td>
                    <td style="width: 204px">
                        <asp:TextBox ID="txtasset_owner" runat="server" Width="80px"></asp:TextBox>
                    </td>
                    <td style="width: 204px">
                        &nbsp;</td>
                    <td style="width: 204px">
                        &nbsp;</td>
                </tr>
                <tr>
                    <td align="right" style="width: 111px">
                        <asp:Label ID="lblAsset_SerialNo" runat="server" meta:resourcekey="lblAsset_SerialNo"></asp:Label>
                    </td>
                    <td style="width: 182px">
                        <asp:TextBox ID="txtasset_serialNo" runat="server" Width="80px"></asp:TextBox>
                    </td>
                    <td align="right" style="width: 144px">
                        <asp:Label ID="lblDept" runat="server" meta:resourcekey="lblDept"></asp:Label>
                    </td>
                    <td style="width: 204px">
                        <asp:TextBox ID="txtDept" runat="server" Width="80px"></asp:TextBox>
                    </td>
                    <td style="width: 204px" align="right">
                        <asp:Label ID="lblStoreSite" runat="server" meta:resourcekey="lblSoreSite"></asp:Label>
                    </td>
                    <td style="width: 204px">
                        <asp:DropDownList ID="ddlFactory" runat="server" DataSourceID="dbOAFactory" 
                            DataTextField="name" DataValueField="id">
                        </asp:DropDownList>
                    </td>
                </tr>
                <tr>
                    <td colspan="6" align="center">
                        <asp:Button ID="btnQuery" runat="server" meta:resourcekey='btnQuery'></asp:Button>
                        &nbsp;&nbsp;
                        <asp:Button ID="btnClose" runat="server" meta:resourcekey='btnClose' />
                        &nbsp;&nbsp;
                        <asp:Button ID="btnConfirm" runat="server" meta:resourcekey="btnConfirm" 
                            Visible="False" />
                        &nbsp;&nbsp;&nbsp;
                        <asp:Button ID="btnNext" runat="server" meta:resourcekey='btnNext' />
                    </td>
                   
                </tr>
                <tr>
                    <td align="center" colspan="6">
                        &nbsp;
                    </td>
                  
                </tr>
                <tr>
                    <td colspan="6" align="center">
                        <TServerControl:TGridView ID="gvMain" runat="server" AllowHoverEffect="False" AllowHoverSelect="False"
                            AutoGenerateColumns="False" DataSourceID="dbASSET1" ShowFooterWhenEmpty="False"
                            ShowHeaderWhenEmpty="True" SkinID="pager" TotalRowCount="0" Width="900px" AllowPaging="True">
                            <Columns>
                                <asp:TemplateField meta:resourcekey="colMaintain">
                                    <HeaderTemplate>
                                        <asp:CheckBox ID="chkMaintainHeader" runat="server" meta:resourcekey="chkMaintain"
                                            OnCheckedChanged="chkMaintainHeader_CheckedChanged" AutoPostBack="True" />
                                    </HeaderTemplate>
                                    <ItemTemplate>
                                        <asp:CheckBox ID="chkMaintain" runat="server" meta:resourcekey="chkMaintain" 
                                            oncheckedchanged="chkMaintain_CheckedChanged1" AutoPostBack="True" 
                                            ToolTip='<%# Bind("asset_serialNo") %>' />
                                    </ItemTemplate>
                                    <ItemStyle Wrap="False" />
                                </asp:TemplateField>
                                <asp:BoundField DataField="DefName" meta:resourcekey="colassetdef_id" />
                                <asp:BoundField DataField="asset_serialNo" meta:resourcekey="colasset_serialNo" />
                                <asp:BoundField DataField="ownerName" meta:resourcekey="colasset_owner" />
                                <asp:BoundField DataField="UseName" meta:resourcekey="colUser2" />
                                <asp:BoundField DataField="asset_status" meta:resourcekey="colasset_status" />
                                <asp:BoundField DataField="ComputerName" meta:resourcekey="colComputerName" />
                                <asp:BoundField DataField="Class" HeaderText="Class" />
                                <asp:BoundField DataField="Location" meta:resourcekey="colLocation" />
                                  <asp:BoundField DataField="asset_owner"  />
                                
                            </Columns>
                            <EmptyDataTemplate>
                                <asp:Label ID="lblEmpty" runat="server" ForeColor="Red" meta:resourcekey="lblEmpty"></asp:Label>
                            </EmptyDataTemplate>
                        </TServerControl:TGridView>
                    </td>
                    
                </tr>
            </table>
        </asp:Panel>
